package priv.yan;

import java.util.Scanner;

public class Diamond {
    public static void main(String[] args) {
        Scanner input= new Scanner(System.in) ;
        System.out.println("请输入你想要的菱形的行数-1(行数为奇数):");
        int num=input.nextInt();
        int space=50;

        for (int i=1;i<=num;i+=2){

            for (int m=1;m<=space;m++){
                System.out.print(" ");
            }
            space--;
            for (int j=1;j<=i;j++){
                System.out.print("*");
            }
            System.out.println();
        }

        for (int i=num+1;i>=1;i-=2){
            for (int m=1;m<=space;m++){
                System.out.print(" ");
            }
            space++;
            for (int j=1;j<=i;j++){
                System.out.print("*");
            }
            System.out.println();
        }


    }
}
